<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/6/28
  Time: 18:31
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

<%
    String userName = "";
    String passWord = "";
    Cookie[] cookies = request.getCookies();//根据请求数据，找到cookie数组
    for (Cookie c : cookies) {
        if ("userName".equals(c.getName())) {
            userName = c.getValue();
        }
        if ("passWord".equals(c.getName())) {
            passWord = c.getValue();
        }
    }
%>

<form action="login.do" method="get">
    用户名 <input type="text" name="userName" value="<%=userName%>"><br>
    密码<input type="text" name="passWord" value="<%=passWord%>"><br>
    十天内记住我<input type="checkbox" name="remberMe" checked><br>
    <input type="submit" value="登录"><br>
</form>
</body>
</html>
